package com.heima.wemedia;


import com.heima.common.aliyun.GreenImageScan;
import com.heima.common.aliyun.GreenTextScan;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@SpringBootTest
@RunWith(SpringRunner.class)
public class test {

    @Autowired
    GreenTextScan greenTextScan;
    @Autowired
    GreenImageScan greenImageScan;

    @Test
    public void testContext() throws Exception {
        Map map = greenTextScan.greeTextScan("  ys");
        System.out.println(map);
    }

    @Test
    public void testImage() throws Exception {
        List<byte[]> list = new ArrayList();
        list.add("http://192.168.200.130:9000/leadnews/2025/01/08/df691fb5f74a43939c9e5d6c59c541a9.jpg".getBytes());
        greenImageScan.imageScan(list);
    }

}
